package dryven.util.crypt;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class SHA1Hash extends MessageDigestHash {
	private String _value;
	
	public SHA1Hash(String value) {
		super();
		_value = value;
	}
	
	@Override
	public String hash() {
		try {
			return processDigest(MessageDigest.getInstance("SHA1"),_value);
		} catch (NoSuchAlgorithmException e) {
			throw new RuntimeException("Could not get SHA1 message digest",e);
		}
	}
}
